def fun_str():
    return '''
def sample(x,y,z):
    return x+y+z
test = sample(x,y,z)
    '''


if __name__ == '__main__':
    fun = fun_str()
    env = {"x": 1, "y": 2, "z": 3}
    exec(fun, env)
    print(env['test'])
